package com.game.config;


import java.util.Set;

import com.game.net.NetAddress;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "cluster")
@Component
public class NodeConfig {
    protected String parentPath = "cluster";

    protected String type;

    protected String name;

    protected int number;

    protected boolean useGate;

    protected NetAddress tcpAddress;

    protected NetAddress httpAddress;

    protected NetAddress rpcAddress;

    public int[] messageTypes;

    public int[] gameTypes;

    public int weight = 1;

    public String[] whiteIpList;

    public int[] whiteIdList;

    public boolean workPool;

    public int workPoolNum = 9;

    public Set<Integer> micserviceMessageTypes;

    public boolean showMicservice = true;

    public String getParentPath() {
        return this.parentPath;
    }

    public void setParentPath(String parentPath) {
        this.parentPath = parentPath;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return this.number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public NetAddress getTcpAddress() {
        return this.tcpAddress;
    }

    public void setTcpAddress(NetAddress tcpAddress) {
        this.tcpAddress = tcpAddress;
    }

    public NetAddress getHttpAddress() {
        return this.httpAddress;
    }

    public void setHttpAddress(NetAddress httpAddress) {
        this.httpAddress = httpAddress;
    }

    public NetAddress getRpcAddress() {
        return this.rpcAddress;
    }

    public void setRpcAddress(NetAddress rpcAddress) {
        this.rpcAddress = rpcAddress;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isUseGate() {
        return this.useGate;
    }

    public void setUseGate(boolean useGate) {
        this.useGate = useGate;
    }

    public int[] getMessageTypes() {
        return this.messageTypes;
    }

    public void setMessageTypes(int[] messageTypes) {
        this.messageTypes = messageTypes;
    }

    public int[] getGameTypes() {
        return this.gameTypes;
    }

    public void setGameTypes(int[] gameTypes) {
        this.gameTypes = gameTypes;
    }

    public int getWeight() {
        return this.weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public String[] getWhiteIpList() {
        return this.whiteIpList;
    }

    public void setWhiteIpList(String[] whiteIpList) {
        this.whiteIpList = whiteIpList;
    }

    public int[] getWhiteIdList() {
        return this.whiteIdList;
    }

    public void setWhiteIdList(int[] whiteIdList) {
        this.whiteIdList = whiteIdList;
    }

    public boolean isWorkPool() {
        return this.workPool;
    }

    public void setWorkPool(boolean workPool) {
        this.workPool = workPool;
    }

    public Set<Integer> getMicserviceMessageTypes() {
        return this.micserviceMessageTypes;
    }

    public void setMicserviceMessageTypes(Set<Integer> micserviceMessageTypes) {
        this.micserviceMessageTypes = micserviceMessageTypes;
    }

    public int getWorkPoolNum() {
        return this.workPoolNum;
    }

    public void setWorkPoolNum(int workPoolNum) {
        this.workPoolNum = workPoolNum;
    }

    public boolean isShowMicservice() {
        return this.showMicservice;
    }

    public void setShowMicservice(boolean showMicservice) {
        this.showMicservice = showMicservice;
    }
}
